//
//  CornerRadiusViewController.m
//  SHWheel
//
//  Created by YYKJ on 2020/10/16.
//  Copyright © 2020 YYKJ. All rights reserved.
//  圆角 + 阴影

#import "CornerRadiusViewController.h"
#import "SHLabel.h"
#import "XXExtension.h"

@interface CornerRadiusViewController ()

@end

@implementation CornerRadiusViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = UIColor.whiteColor;
    
    // UIView
    UIView *cornerView = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 50, 50)];
    cornerView.backgroundColor = UIColor.redColor;
    [cornerView xx_drawShadowRadius:25];
    [self.view addSubview:cornerView];
    
    
    // UILabel
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(cornerView.maxX + 10, 10, 50, 50)];
    label.backgroundColor = UIColor.redColor;
    label.text = @"label";
    label.textAlignment = NSTextAlignmentCenter;
    [label xx_drawShadowRadius:25];
    [self.view addSubview:label];
    
    // UIButton
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.backgroundColor = UIColor.xx_randomColor;
    [button setTitle:@"button" forState:UIControlStateNormal];
    button.frame = CGRectMake(label.maxX + 10, 10, 70, 50);
    [button xx_drawShadowRadius:25];
    [self.view addSubview:button];
    
    // SHLabel
    SHLabel *insetLabel = [[SHLabel alloc] initWithFrame:CGRectZero];
    insetLabel.canPerformCopyAction = YES;
    insetLabel.center = CGPointMake(100, 200);
    insetLabel.backgroundColor = UIColor.redColor;
    insetLabel.text = @"label";
    insetLabel.textAlignment = NSTextAlignmentCenter;
    insetLabel.contentEdgeInsets = UIEdgeInsetsMake(5, 10, 5, 10);
    [insetLabel sizeToFit];
    [self.view addSubview:insetLabel];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
